package com.springboot.centersystem.service;

import com.springboot.centersystem.dao.AdminMapper;
import com.springboot.centersystem.entity.Food;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service

public class AdminServiceImpl implements AdminService {

    //注入Mapper接口对象
    @Resource
    private AdminMapper adminMapper;

    @Override
    public List<Food> list() {
       return  adminMapper.list();
    }

    @Override
    public int insertFood(Food food) {
        return adminMapper.insertFood(food);
    }

    @Override
    public void delete(int id) {
        adminMapper.delete(id);
    }

    @Override
    public Food selectid(int id) {
        return adminMapper.selectid(id);
    }
}